#include "winBtn.h"
#include "btnManager.h"

winBtn::winBtn()
{}

winBtn::~winBtn()
{
	DestroyWindow(m_hwnd);
}



HWND
winBtn::Create(TCHAR tsname[], HWND hwnd)
{
	shape sp;
	getShape(&sp);
	m_uiMenu = btnManager::Get()->increaseMenu();
	m_hWndContainer = hwnd;
	m_hwnd = CreateWindow(TEXT("button"),
								tsname,
								WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
								sp.m_x,
								sp.m_y,
								sp.m_cx,
								sp.m_cy,
								hwnd,
								(HMENU)m_uiMenu,
								btnManager::Get()->getInstance(),
								NULL);
	return 0;
}